import request from '@/utils/http'

export class RoleService {
	static pages(params:any) {
	  return request.post<any>({
	    url: '/sys/role/pages',
		params
	  })
	}
	
	static save(params:any) {
	  return request.post<any>({
	    url: '/sys/role/save',
		params
	  })
	}
	
	static delete(id:string) {
	  return request.del<any>({
	    url: '/sys/role/detain/'+id,
	  })
	}
	
	static menus(id:string) {
	  return request.get<any>({
	    url: '/sys/role/'+id+'/menus',
	  })
	}
	
	static saveMenuIds(id:string,params:any) {
	  return request.post<any>({
	    url: '/sys/role/'+id+'/store/menus',
		params
	  })
	}
	
	static options(params:any) {
	  return request.post<any>({
	    url: '/sys/role/options',
		params
	  })
	}
	
}

